//
//  MPRequest.h
//  SearchPeople
//
//  Created by zk on 16/5/10.
//
//

#import <Foundation/Foundation.h>
#import "MPResponse.h"

#define HttpUrl @"http://115.28.48.128:8081/"  ///<服务器地址
#define TimeOut  15

@class MPRequest;

typedef void(^MPRequestCompletedBlock)(MPRequest *request, MPResponse *response);

@interface MPRequest : NSObject

@property (strong, nonatomic) NSString *requestName;
@property (strong, nonatomic) NSString *requestPath;
@property (assign, nonatomic, getter=isShowErrorMsg) BOOL showErrorMsg;

@property (strong, nonatomic) NSMutableDictionary *params;
@property (strong, nonatomic) NSMutableURLRequest *urlRequest;

- (void)startRequestWithSuccessBlock:(MPRequestCompletedBlock )successBlock
                     WithFailedBlock:(MPRequestCompletedBlock )failedBlock;

- (void)cancelRequest;

@end
